<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<link rel="shortcut icon" type="image/x-icon"
	th:href="@{/img/favicon.png}">
<title>Spring Boot Project Creator</title>
<link th:href="@{/webjars/bootstrap/4.2.1/css/bootstrap.min.css}"
	rel="stylesheet" />
<link th:href="@{/iconfont/iconfont.css}"
	rel="stylesheet" />
<link th:href="@{/plugin/tag-editor/jquery.tag-editor.css}"
	rel="stylesheet" />	
<link th:href="@{/css/index.css}"
	rel="stylesheet" />	
</head>
<body>

	<div class="container-fluid">
		<div class="row head"></div>
		<div class="row title">
			<div class="col-md-1"></div>
			<div class="col-md-8">
				<h2 class="">
					<img class="img-fluid img-thumbnail logo"
						th:src="@{/img/favicon.png}"><span>Spring Boot
						Project Creator</span>
				</h2>				
			</div>
			<div class="col-sm-2">
				<div class="dropdown">
  <button  style="background-color: #eee;" class="btn btn-default dropdown-toggle"  type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
   English
    <span class="caret"></span>
  </button>
  <ul class="dropdown-menu" aria-labelledby="dropdownMenu1" style="width: 7rem;min-width: 7rem;">
    <li ><a th:href="@{/index?lang=cn}" style="color: #000;padding-left: 0.8rem;"> Chinese</a></li>
  </ul>
</div>
			</div>
		</div>
		<div class="row main">
			<div class="col-md-2"></div>
			<div class="col-md-8">
				<form  th:action="@{/generate}" method="post">
					<div class="form-inline margin-top">
						<div class="form-group">
							<h4>
								Generate a <select class="form-control"><option>Maven Project</option></select>
								with Java <select class="form-control" id="javaVersion" name="javaVersion"><option>1.7</option><option>1.8</option></select>
								and Spring Boot <select class="form-control" id="version" name="springBootVersion"><option>1.5.20</option><option>2.0.9</option><option>2.1.4</option></select>
							</h4>
						</div>					
					</div>
					<div class="form-group margin-top">
						<h4><i class="icon iconfont icon-fenleiorguangchangorqita"></i> Project Metadata</h4>
						<h6><i class="icon iconfont icon-listview"></i> Artifact coordinates <span class="ps"> <i class="icon iconfont icon-tishijingti"></i> (artifact is the project name,group is the package name.)</span></h6>					
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
						 <label class="control-label label"><span class="err">*</span>Artifact</label>
   						 <input type="text" onKeyUp="value=value.replace(/[^a-zA-Z0-9_-]/g,'')"  class="form-control input" value="demo" name="artifactId" id="artifactId">
						</div>		
						<div class="form-group">
						 <label class="control-label label"><span class="err">*</span>Group</label>
   						 <input type="text" onKeyUp="value=value.replace(/[^a-z0-9_.]/g,'')"  class="form-control input" value="com.demo" name="groupId" id="groupId">
						</div>												
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
						 <label class="control-label label">Packaging</label>
   						 <select class="form-control input" style="width:12rem;" name="packaging"><option>jar</option><option>war</option></select>
						</div>							
						<div class="form-group">
						 <label class="control-label label">Name</label>
   						 <input type="text"  class="form-control input" style="margin-left: 0.18rem;" value="" name="name" id="name">
						</div>							
					</div>
					<div class="form-group margin-top">
					 <label class="control-label label">Description</label>
					 <textarea class="form-control" name="description" rows="1" cols="1"></textarea>
					</div>
					<div class="form-group margin-top">
						<h4><i class="icon iconfont icon-fenleiorguangchangorqita"></i> Spring Boot Project Config</h4>											
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2">
							  <input type="checkbox" id="openDataSource" name="openDataSource" value="true">&nbsp;open DataSource
							</label>
							<label class="checkbox-inline label2">
							  <input type="checkbox" id="openView"  name="openView" value="true">&nbsp;open View
							</label>
							<label class="checkbox-inline label2">
							  <input type="checkbox" id="openLogback" name="openLogback" value="true">&nbsp;open Logback
							</label>
							
						</div>																			
					</div>
					<div class="datasource">
						<div class="form-group margin-top">
						 	<h5>DataSource<span class="ps"> <i class="icon iconfont icon-tishijingti"></i> (Data source external network environment.)</span></h5>					 
						</div>
						<div class="form-inline margin-top">
							<div class="form-group">
								 <label class="control-label label">Type</label>
		   						 <select class="form-control input" id="type" style="width:12rem;" name="type"><option>oracle</option><option>mysql</option><option>sqlserver</option></select>
							</div>		
							<div class="form-group">
								 <label class="control-label label">PoolType</label>
		   						 <select class="form-control input" id="poolType" style="width:12rem;" name="poolType"><option>tomcat-jdbc</option><option>druid</option><option>HikariCP</option></select>
							</div>									 
						</div>
						<div class="form-group margin-top">
							 <label class="control-label label"><span class="err">*</span>Url</label>
	   						 <input type="text"  class="form-control input" value="jdbc:oracle:thin:@127.0.0.1:1521:ORCL" name="url" id="url">
							</div>	
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>Username</label>
	   						 <input type="text"  class="form-control input" value="" name="username" id="username">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>Password</label>
	   						 <input type="password" class="form-control input" value="" name="password" id="password">
							</div>										 
						</div>
						<div class="form-inline margin-top">
							<div class="form-group">
								<label class="checkbox-inline label2">
								  <input type="checkbox"  name="tableDocCreated">&nbsp;Create Tables Doc&nbsp;<span class="ps"><i class="icon iconfont icon-tishijingti"></i>（The corresponding table in the database needs to be annotated, otherwise the fields indicate no information.）</span>
								</label>							
							</div>																							
						</div>
					</div>
					<div class="view">
						<div class="form-group margin-top">
						 	<h5>View</h5>					 
						</div>
						<div class="form-inline margin-top">
							<div class="form-group">
							 <label class="control-label label">ViewType</label>
	   						 <select class="form-control input" style="width:10rem;" name="viewType"><option>thymeleaf</option><option>jsp</option><option>freemarker</option></select>
							</div>						
						</div>
					</div>
					<div class="logback">
						<div class="form-group margin-top">
						 	<h5>Logback</h5>					 
						</div>
						<div class="form-inline margin-top">
						 	<div class="form-group">
								 <label class="control-label label">filePath</label>
		   						 <input type="text"  class="form-control input" value="" placeholder="default  ${catalina.home}/logs" name="logfilePath" id="logfilePath">
							</div>	
						 	<div class="form-group">
								 <label class="control-label label">fileName</label>
		   						 <input type="text"  class="form-control input" value="" placeholder="default project name" name="logfileName" id="logfileName">
							</div>	
						</div>
						<div class="form-inline margin-top">
						 	<div class="form-group">
								 <label class="control-label label">maxHistory</label>
		   						 <input type="text"  class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="" placeholder="default 15,unit days" name="logmaxHistory" id="logmaxHistory">
							</div>	
						 	<div class="form-group">
								 <label class="control-label label">maxFileSize</label>
		   						 <input type="text"  class="form-control input" value="" placeholder="default 10MB" name="logmaxFileSize" id="logmaxFileSize">
							</div>	
						</div>
						<div class="form-group margin-top">
								 <label class="control-label label">outFormat</label>
		   						 <input type="text" style="width: 100%;"  class="form-control input" value="" placeholder="default【project name】 %d{yyyy-MM-dd HH:mm:ss.SSS} %p %-4relative --- [%t] %c:%line  ✈✈✈      %m%n" name="logoutFormat" id="logoutFormat">
						</div>
					</div>
					<div class="form-group margin-top">
					 	<h5>Dependencies</h5>					 
					</div>
					
					<div class="form-group margin-top " id="db_persistence">
						<h6><i class="icon iconfont icon-listview"></i> Data Persistence Management</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="mybatis-plus">
							  <input type="checkbox"  name="dependency" value="mybatis-plus">&nbsp;Mybatis-plus
							</label>					
						</div>
						<div class="form-group">
							<label class="checkbox-inline label2" id="jdbc">
							  <input type="checkbox"  name="dependency" value="jdbc">&nbsp;Spring-jdbc
							</label>					
						</div>																							
					</div>
					<div class="mybatis-plus">
						<div class="form-group margin-top">
						 	<h5>Mybatis Plus <span class="ps"> <i class="icon iconfont icon-tishijingti"></i> (Generate entity classes based on table names.)</span></h5>					 
						</div>
						<div class="form-group">
							 <label class="control-label label">Tables<span class="ps">(Add the name of the table,such as:'TEST_USER'.All tables are selected by default if not added!)</span></label>
	   						 <input type="text"  class="form-control input" value="" name="table" id="tables">	   				
						</div>		
						<div class="form-group">
							 <label class="control-label label" >Table Prefixes<span class="ps">(Remove table prefix,such as:'TEST_'.)</span></label>
	   						 <input type="text"  class="form-control input" value="" name="tablePrefix" id="tablePrefixs">
						</div>										 															 
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> NoSQL database</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="redis">
							  <input type="checkbox" id="redis" name="dependency" value="redis">&nbsp;Redis
							</label>
							<label class="checkbox-inline label2" id="mongoDB">
							  <input type="checkbox"  name="dependency" value="mongoDB">&nbsp;MongoDB
							</label>						
						</div>																							
					</div>
					<div class="redis">
						<div class="form-group margin-top">
						 	<h5>Redis</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>database</label>
	   						 <input type="text"  class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="0" name="rdatabase" id="rdatabase">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>host</label>
	   						 <input type="text" class="form-control input" value="localhost" name="rhost" id="rhost">
							</div>										 																 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>port</label>
	   						 <input type="text" class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="6379" name="rport" id="rport">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>password</label>
	   						 <input type="password" class="form-control input" value="" name="rpassword" id="rpassword">
							</div>										 															 
						</div>
					</div>
					<div class="mongoDB">
						<div class="form-group margin-top">
						 	<h5>MongoDB</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>database</label>
	   						 <input type="text"  class="form-control input"  value="test" name="mdatabase" id="mdatabase">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>host</label>
	   						 <input type="text" class="form-control input" value="localhost" name="mhost" id="mhost">
							</div>
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>port</label>
	   						 <input type="text" class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="27017" name="mport" id="mport">
							</div>										 
																 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label">username</label>
	   						 <input type="text" class="form-control input"  value="" name="musername" id="musername">
							</div>										 
							<div class="form-group">
							 <label class="control-label label">password</label>
	   						 <input type="password" class="form-control input" value="" name="rpassword" id="rpassword">
							</div>										 															 
						</div>
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> Authority Control</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="shiro">
							  <input type="checkbox"  name="dependency" value="shiro">&nbsp;Shiro
							</label>					
						</div>																							
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> Task Scheduling (Timed Task)</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="schedule">
							  <input type="checkbox"  name="dependency" value="schedule">&nbsp;Spring Scheduler
							</label>							
							<label class="checkbox-inline label2" id="quartz">
							  <input type="checkbox"  name="dependency" value="quartz">&nbsp;Quartz Scheduler&nbsp;<span class="ps"> <i class="icon iconfont icon-tishijingti"></i> (For persistence, database support is required)</span>
							</label>							
						</div>																							
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> MQ</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="rabbitmq">
							  <input type="checkbox"  name="dependency" value="rabbitmq">&nbsp;RabbitMQ
							</label>							
							<label class="checkbox-inline label2" id="activemq">
							  <input type="checkbox"  name="dependency" value="activemq">&nbsp;ActiveMQ
							</label>							
							<label class="checkbox-inline label2" id="kafka">
							  <input type="checkbox"  name="dependency" value="kafka">&nbsp;Kafka
							</label>							
						</div>																							
					</div>
					<div class="rabbitmq">
						<div class="form-group margin-top">
						 	<h5>RabbitMQ</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>host</label>
	   						 <input type="text"  class="form-control input" value="localhost"  name="rabbithost" id="rabbithost">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>port</label>
	   						 <input type="text" class="form-control input" onKeyUp="value=value.replace(/[^0-9]/g,'')" value="5672" name="rabbitport" id="rabbitport">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>virtual-host</label>
	   						 <input type="text" class="form-control input" value="/" name="virtualHost" id="virtualHost">
							</div>									 
						</div>				
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>username</label>
	   						 <input type="text"  class="form-control input" value=""  name="rabbitusername" id="rabbitusername">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>password</label>
	   						 <input type="password" class="form-control input"  value="" name="rabbitpassword" id="rabbitpassword">
							</div>										 								 
						</div>				
					</div>
					<div class="activemq">
						<div class="form-group margin-top">
						 	<h5>ActiveMQ</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>url</label>
	   						 <input type="text"  class="form-control input" value="tcp://localhost:61616"  name="activeurl" id="activeurl">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>user</label>
	   						 <input type="text" class="form-control input"  value="" name="activeuser" id="activeuser">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>password</label>
	   						 <input type="password" class="form-control input" value="" name="activepassword" id="activepassword">
							</div>									 
						</div>				
						<div class="form-inline margin-top">							
							<div class="form-group">
							<label class="checkbox-inline label2" id="activeinMemory">
							  <input type="checkbox"  name="activeinMemory" value="activeinMemory">&nbsp;in-memory
							</label>							
							<label class="checkbox-inline label2" id="activepoolEnabled">
							  <input type="checkbox"  name="activepoolEnabled" value="activepoolEnabled">&nbsp;pool-enabled
							</label>
							</div>										 															 								 
						</div>				
					</div>
					<div class="kafka">
						<div class="form-group margin-top">
						 	<h5>Kafka</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>bootstrap-servers</label>
	   						 <input type="text"  class="form-control input" value="localhost:9092"  name="bootstrapServers" id="bootstrapServers">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>consumer-group-id</label>
	   						 <input type="text" class="form-control input"  value="my-consumer-group-id" name="consumerGroupId" id="consumerGroupId">
							</div>										 														 
						</div>				
						<div class="form-inline margin-top">							
							<div class="form-group">
							<label class="checkbox-inline label2" id="consumerEnableAutoCommit">
							  <input type="checkbox"  name="consumerEnableAutoCommit" value="consumerEnableAutoCommit">&nbsp;consumer-enable-auto-commit
							</label>														 
							</div>										 															 								 
						</div>				
						<div class="form-inline margin-top">							
							<div class="form-group">
							<label class="control-label label">consumer-auto-offset-reset</label>
	   						 <select class="form-control input" style="width:10rem;" name="consumerAutoOffsetReset"><option>earliest</option><option>latest</option><option>none</option></select>
																					 
							</div>										 															 								 
						</div>				
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> Search Engines</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
							<label class="checkbox-inline label2" id="solr">
							  <input type="checkbox"  name="dependency" value="solr">&nbsp;Solr
							</label>							
							<label class="checkbox-inline label2" id="elasticsearch">
							  <input type="checkbox"  name="dependency" value="elasticsearch">&nbsp;Elasticsearch
							</label>							
						</div>																							
					</div>
					
					<div class="solr">
						<div class="form-group margin-top">
						 	<h5>Solr</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>host</label>
	   						 <input type="text"  class="form-control input" value="http://127.0.0.1:8983/solr"  name="solrhost" id="solrhost">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>zookeeper host</label>
	   						 <input type="text" class="form-control input"  value="" name="solrzkHost" id="solrzkHost">
							</div>										 								 
						</div>
					</div>
					<div class="elasticsearch">
						<div class="form-group margin-top">
						 	<h5>Elasticsearch</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>cluster name</label>
	   						 <input type="text"  class="form-control input" value="elasticsearch"  name="esclusterName" id="esclusterName">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>cluster nodes</label>
	   						 <input type="text" class="form-control input"  value="127.0.0.1:9300" name="esclusterNodes" id="esclusterNodes">
							</div>										 								 
						</div>
					</div>
					<div class="form-group margin-top">
						<h6><i class="icon iconfont icon-listview"></i> Other</h6>					 
					</div>
					<div class="form-inline margin-top">
						<div class="form-group">
														
							<label class="checkbox-inline label2" id="mail">
							  <input type="checkbox"  name="dependency" value="mail">&nbsp;Mail
							</label>
																
						</div>																							
					</div>

					
					<div class="mail">
						<div class="form-group margin-top">
						 	<h5>Mail</h5>					 
						</div>
						<div class="form-inline margin-top">							
							<div class="form-group">
							 <label class="control-label label" ><span class="err">*</span>host</label>
	   						 <input type="text"  class="form-control input" placeholder="such as:smtp.163.com"  name="mailhost" id="mailhost">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>username</label>
	   						 <input type="text" class="form-control input" value="" name="mailusername" id="mailusername">
							</div>										 
							<div class="form-group">
							 <label class="control-label label"><span class="err">*</span>password</label>
	   						 <input type="password" class="form-control input" value="" name="mailpassword" id="mailpassword">
							</div>									 
						</div>				
					</div>
					
					<div class="form-group margin-top ">
					 	<h5>Author</h5>						 				 
					</div>
					<div class="form-inline margin-top">
					 	<div class="form-group">
							 <label class="control-label label">Author</label>
	   						 <input type="text"  class="form-control input" value="" name="author" id="author">
						</div>	
					 </div>
					<div class="row"  style="margin-top: 4rem;">
						<div class="col-md-4"></div>
						<div class="col-md-4">
						 	<button type="button" id="generate" class="btn btn-primary btn-lg" style="background: #148C46;margin: 0 auto;"><i class="icon iconfont icon-weibiaoti46"></i> Generate Project</button>
						</div>
						<div class="col-md-4"></div>
					</div>
				</form>
			</div>
			<div class="col-sm-2"></div>
		</div>
		<div class="row footer">
			<div class="col-sm-3 text-right"><p>powered by Stary </p></div> 
			<div class="col-sm-3"> <p>E-mail：stary1993@qq.com</p></div>	
			<div class="col-sm-3"><a style="color: #fff;" href="https://gitee.com/stary-springboot/stary_project" ><img class="img-fluid img-thumbnail" th:src="@{/img/gitee_mayun.jpg}" width="40rem" height="40rem"/> Yards Cloud</a></div>
			
		</div>
	</div>

	<script type="text/javascript"
		th:src="@{/webjars/jquery/3.3.1/jquery.min.js}"></script>
	<script type="text/javascript"
		th:src="@{/webjars/popper.js/1.14.6/umd/popper.min.js}"></script>
	<script type="text/javascript"
		th:src="@{/webjars/bootstrap/4.2.1/js/bootstrap.min.js}"></script>
	<script type="text/javascript"
		th:src="@{/webjars/layer/3.1.1/src/layer.js}"></script>
	<script type="text/javascript"
		th:src="@{/plugin/tag-editor/jquery.tag-editor.js}"></script>
	<script  th:inline="javascript">var path=[[${#request.getContextPath()}]];var msg='Gets the table information';</script>
	<script type="text/javascript"
		th:src="@{/js/index.js}"></script>
		<script type="text/javascript">
		
			$("#generate").click(function(){

				var artifactId=$.trim($("#artifactId").val());
				if(artifactId==''){
					tips('#artifactId','input artifact!');
					return;
				}
				var groupId=$.trim($("#groupId").val());
				if(groupId==''){
					tips('#groupId','input group!');
					return;
				}else{
					if(groupId.indexOf('.')<0 || groupId.substring(groupId.length-1,groupId.length)=='.'){
						tips('#groupId','must contain \'.\' and not at the back!');
						return;
					}
				}
				if($("#openDataSource").is(":checked")){
					var url=$.trim($("#url").val());
					if(url==''){
						tips('#url','input url!');
						return;
					}
					var username=$.trim($("#username").val());
					if(username==''){
						tips('#username','input username!');
						return;
					}
					var password=$.trim($("#password").val());
					if(password==''){
						tips('#password','input password!');
						return;
					}
				}
				if($("#mybatis-plus").children().is(":checked")){
					var tables=$('#tables').tagEditor('getTags')[0].tags;				
					$('#tables').val(tables);	
					var tablePrefixs=$('#tablePrefixs').tagEditor('getTags')[0].tags;				
					$('#tablePrefixs').val(tablePrefixs);				
					
				}
				if($("#redis").children().is(":checked")){
					var rdatabase=$.trim($('#rdatabase').val());
					if(rdatabase==''){
						tips('#rdatabase','input redis database!');
						return;
					}
					var rhost=$.trim($('#rhost').val());
					if(rhost==''){
						tips('#rhost','input redis host!');
						return;
					}								
					var rpassword=$.trim($('#rpassword').val());
					if(rpassword==''){
						tips('#rpassword','input redis password!');
						return;
					}								
					
				}				
				if($("#mongoDB").children().is(":checked")){
					var mdatabase=$.trim($('#mdatabase').val());
					if(mdatabase==''){
						tips('#mdatabase','input mongoDB database!');
						return;
					}
					var mhost=$.trim($('#mhost').val());
					if(mhost==''){
						tips('#mhost','input mongoDB host!');
						return;
					}								
					var mport=$.trim($('#mport').val());
					if(mport==''){
						tips('#rhost','input mongoDB port!');
						return;
					}													
				}
				if($("#mail").children().is(":checked")){
					var mailhost=$.trim($('#mailhost').val());
					if(mailhost==''){
						tips('#mailhost','input mail host!');
						return;
					}
					var mailusername=$.trim($('#mailusername').val());
					if(mailusername==''){
						tips('#mailusername','input mail username!');
						return;
					}
					var mailpassword=$.trim($('#mailpassword').val());
					if(mailpassword==''){
						tips('#mailpassword','input mail password！');
						return;
					}
				}
				if($("#rabbitmq").children().is(":checked")){
					var rabbithost=$.trim($('#rabbithost').val());
					if(rabbithost==''){
						tips('#rabbithost','input rabbitmq host!');
						return;
					}
					var rabbitport=$.trim($('#rabbitport').val());
					if(rabbitport==''){
						tips('#rabbitport','input rabbitmq port!');
						return;
					}
					var virtualHost=$.trim($('#virtualHost').val());
					if(virtualHost==''){
						tips('#virtualHost','input rabbitmq virtual-host!');
						return;
					}
					var rabbitusername=$.trim($('#rabbitusername').val());
					if(rabbitusername==''){
						tips('#rabbitusername','input rabbitmq username!');
						return;
					}
					var rabbitpassword=$.trim($('#rabbitpassword').val());
					if(rabbitpassword==''){
						tips('#rabbitpassword','input rabbitmq password!');
						return;
					}
				}
				if($("#activemq").children().is(":checked")){
					var activeurl=$.trim($('#activeurl').val());
					if(activeurl==''){
						tips('#activeurl','input activemq url!');
						return;
					}
					var activeuser=$.trim($('#activeuser').val());
					if(activeuser==''){
						tips('#activeuser','input activemq user!');
						return;
					}
					var activepassword=$.trim($('#activepassword').val());
					if(activepassword==''){
						tips('#activepassword','input activemq password!');
						return;
					}
				}
				if($("#kafka").children().is(":checked")){
					var bootstrapServers=$.trim($('#bootstrapServers').val());
					if(bootstrapServers==''){
						tips('#bootstrapServers','input kafka bootstrap-servers!');
						return;
					}
					var consumerGroupId=$.trim($('#consumerGroupId').val());
					if(consumerGroupId==''){
						tips('#consumerGroupId','input kafka consumer-group-id!');
						return;
					}
				}
				if($("#solr").children().is(":checked")){
					var solrhost=$.trim($('#solrhost').val());
					if(solrhost==''){
						tips('#solrhost','input solr host!');
						return;
					}
					var solrzkHost=$.trim($('#solrzkHost').val());
					if(solrzkHost==''){
						tips('#solrzkHost','input zookeeper host!');
						return;
					}
				}
				if($("#elasticsearch").children().is(":checked")){
					var esclusterName=$.trim($('#esclusterName').val());
					if(esclusterName==''){
						tips('#esclusterName','input elasticsearch cluster name!');
						return;
					}
					var esclusterNodes=$.trim($('#esclusterNodes').val());
					if(esclusterNodes==''){
						tips('#esclusterNodes','input elasticsearch cluster nodes!');
						return;
					}
				}
				if($.trim($("#author").val())==''){
					tips('#author','input author!');
					return;					
				}
				$(":text").each(function(){
					$(this).val($.trim($(this).val()));
				});
				layer.msg('generating...', {
					  icon: 16
					  ,shade: 0.07
				});
					$('form').submit();
					setTimeout(function(){
						layer.closeAll();
					}, 2000);
			});
		</script>
</body>
</html>